/**
 * Copyright 2016 Qiyi Inc. All rights reserved.
 *
 * @file:   StatisticSty2Percent.Action.js
 * @path:   js-src/StatisticSty2/
 * @desc:   Action静态对象，声明对象以及绑定事件、对外接口等
 * @author: zhang@qiyi.com
 * @date:   2016-03-28
 */
qui(
    function(require, exports, module) {

        StatisticSty2Percent.Action = (function() {

            //表格
            var statisticSty2PercentGrid = null;

            var getStatisticSty2PercentGrid = function (options) {
                if (!statisticSty2PercentGrid) {
                    statisticSty2PercentGrid = new StatisticSty2Percent.Grid($.extend(true,
                    {'$container': $('#StatisticSty2PercentListContainer'), type:0}, options))
                }

                return statisticSty2PercentGrid;
            }

            var statisticSty2PercentGridRun = function(options) {
                statisticSty2PercentGrid = getStatisticSty2PercentGrid(options);
                statisticSty2PercentGrid.run();

                console.log('grid run');
            }

            //统计Sty2列表
            var run = function() {
                Ancestor.Config.EPG_AUTH.list='/statisticSty2Percent/list';
                statisticSty2PercentGridRun({});
            }

            return {
                run:run,
                getStatisticSty2PercentGrid:getStatisticSty2PercentGrid
            }
        })();
    }
)